// TOWN DIALOGUE SCRIPT
//    Town 140: Bolton

begintalkscript;

variables;

short i,j,k,r1,choice;

// Meiko

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Meiko";
	text1 = "You meet a young priestess. She seems slightly out of place in this grimy inn.";
	text2 = "She nods when you approach. _Greetings. I am Meiko, of the Anama. If is a rare pleasure to meet traveling warriors in these hard times._";
	text5 = "Meiko gives you her full attention, only pausing occasionally to sip her tea. _I am honored that you are still here. Would you like to discuss Anama beliefs and precepts?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = -1;
	question = "_Can you teach me any rituals?_";
	text1 = "She blushes. _I am still but a young missionary. I do not yet have that sort of power. The Isle of Bigail is where you should go._";

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_It's not often I meet a traveling priest._";
	text1 = "_I am out spreading the faith of the Anama. It is a path of great wisdom in a dark world. My beliefs sustain me._";
	text3 = "She notes your Anama ring. _Yes, followers of our ways are scarce here, and even more so farther north. Thus, it is up to missionaries such as us to carry the faith into the dark lands._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_What do the Anama teach?_";
	text1 = "_Our faith is based on the Isle of Bigail. We preach of the dangers of magic, and of the way it puts us in danger and pollutes our souls._";
	text3 = "She smiles. _I know I don't need to tell you of our beliefs. The word has spread that the Avernites have joined us. I am honored to meet you, and can offer you a piece of advice._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 3;
	nextstate = -1;
	condition = has_spec_item(40) > 0;
	question = "_What is your advice to me?_";
	text1 = "_The people of Sharimik, to the north, are very paranoid. Until you've proved somewhere else that you can help them with their problems, it's best to stay away. There's nothing they'd like more than to scapegoat some Avernites for their problems._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_Why do you say magic is dangerous?_";
	text1 = "She smiles sadly. _Just look around. Magical creatures slay us, forcing us into hiding at every turn. Unless something is done about this, these problems will get worse before they get better._";
	text2 = "_If this idea intrigues you, my church can be found on the Isle of Bigail._";
	code =
		if (has_spec_item(40) > 0)
			remove_string(2);
	break;

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_Where is the Isle of Bigail?_";
	text1 = "_You would like to visit Bigail. That is wise. It is a beautiful, recently settled island. My church has worked very hard to improve it, despite many difficulties. Head west to the city of Farport. You can take a ferry over. I hope you go!_";
	text3 = "_If you wish to return to the isle, the quickest route is to take the ferry in Softport, to the west._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

// Voster

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Voster";
	text1 = "A massive, grim man is working a piece of red-hot steel with firm, practiced blows of his hammer. When you approach, he sets the metal in the coals to keep hot, and turns to you.";
	text2 = "_I'm Voster. The smith. What do you want?_";
	text5 = "Voster watches you grimly. His recently made blades are arrayed in neat rows on the nearby counters.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What are you working on?_";
	text1 = "He talks slowly and simply. _I make weapons. When I'm not bothered. I'm also in charge while the mayor is away. The mayor is away a lot. What do you want?_";

begintalknode;
	state = 29;
	nextstate = -1;
	question = "_I'll buy a weapon._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Voster's Weaponry","Voster is a quiet and unhappy man. His clear and strong preference is for you to buy something and get out.",67,3,3);
	break;

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_What sort of weapons can you make?_";
	text1 = "He grunts, and picks up a massive steel hammer. _Anything I can with what little supplies I can find. Mostly iron. I could do better if I had better materials. I don't. Pity. Need good weapons to fight troglos._";

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_Do you know anything about fighting troglodytes?_";
	text1 = "_Troglodytes are tough. Need good weapons. Otherwise they spit you and you die in agony._";

begintalknode;
	state = 30;
	nextstate = 32;
	question = "_Where is the mayor?_";
	text1 = "_Went north to Blackcrag Fortress two months ago. Haven't heard from him since._";

begintalknode;
	state = 32;
	nextstate = -1;
	condition = gf(140,11) <= 1;
	question = "_Have you had any troubles?_";
	text1 = "_Plenty of troubles. Always troubles. The farmers complain to me about a band of ogres to the east, for example. They're wandering around by the river. But I don't have militia to spare to fight them. So there you are._";
	action = SET_SDF 140 11 1;
	code =
	 	toggle_quest(51,1);
	 break;
	 
begintalknode;
	state = 32;
	nextstate = 35;
	question = "_What is Blackcrag Fortress?_";
	text1 = "_The big Empire outpost, at the far end of this continent. The main gateway between Valorim and the rest of the world. Though, if the rumors are true, the Empire has sealed it (and us) off._";

begintalknode;
	state = 35;
	nextstate = -1;
	question = "_Why did he go?_";
	text1 = "_The Empire has given us no help with all of the monsters. None at all. The mayor went to find out why. Still no word from him, so I don't think it's going well._";

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(140,11) == 1 && gf(285,21) >= 1;
	question = "_Those ogres you mentioned? I killed them._";
	code =
		run_hardcode(28);
	break;

// Oppenheimer

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Oppenheimer";
	text1 = "This is clearly a man who's only comfortable when surrounded by piles of books. He nods. _I'm Oppenheimer. A sage._ He closes his book as he says it. A cloud of dust rises up, making him cough.";
	text5 = "Oppenheimer doesn't seem comfortable about people. He shrugs at you and looks around nervous. There are many odd items scattered about this room.";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_What sort of profession are you in?_";
	text1 = "_I'm a sage. My specialty, in terms of study, is items._";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_Can you train me?_";
	text1 = "_Oh, no. No, no, no. I study history. And culture. And language. Not, you know, fighting things._";

begintalknode;
	state = 58;
	nextstate = 59;
	question = "_What can a sage do?_";
	text1 = "_Learning. Teaching. A very lucrative field. It's nice to see adventurers in these parts, by the way._";


begintalknode;
	state = 59;
	nextstate = -1;
	question = "_It's nice that our presence is appreciated._";
	text1 = "_The slimes attack our town all the time. I often fear for my life. I wouldn't be able to see one until it was actually on me. We all wish for someone to appear and help us, but, to be frank, we have little hope._";
	text3 = "_I heard about what you did to the slimes. Everyone has. On behalf of Bolton, I thank you._";
	action = DEP_ON_SDF 307 3 0;

